﻿<UserControl x:Class="DSLPedProjectWizard.Views.SettingsWizardView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Width="450"
             Height="250"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Image Source="/DSLPedProjectWizard;component/Images/mydsl_100.png" 
               Grid.Column="0"
               Grid.RowSpan="3"
               VerticalAlignment="Top"/>
        <Label Grid.Column="1"
               Grid.Row="0"
               VerticalAlignment="Center"
               HorizontalAlignment="Center">
            <Bold>
                Set Language Attributes
            </Bold>
        </Label>
        
        <Grid Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="160" />
                <ColumnDefinition Width="150"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Label Grid.Row="0" Grid.Column="0" BorderThickness="1" BorderBrush="Black">Language Name:</Label>
            <TextBox Grid.Row="0" Grid.Column="1" BorderThickness="1" BorderBrush="Black" Text="{Binding Path=LanguageName, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"/>

            <Label Grid.Row="1" Grid.Column="0" BorderThickness="1" BorderBrush="Black">Language XML Namespace:</Label>
            <TextBox Grid.Row="1" Grid.Column="1" BorderThickness="1" BorderBrush="Black" Text="{Binding Path=LanguageXmlNamespace, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"/>

            <Label Grid.Row="2" Grid.Column="0" BorderThickness="1" BorderBrush="Black">Language Description:</Label>
            <TextBox Grid.Row="2" Grid.Column="1" TextWrapping="Wrap" MaxLength="100" 
                     BorderThickness="1" BorderBrush="Black"
                     Text="{Binding Path=LanguageDescription, UpdateSourceTrigger=PropertyChanged}"/>

            <ListView ItemsSource="{Binding Path=ValidationErrors}" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
                      BorderThickness="0"
                      Background="Transparent"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ScrollViewer.VerticalScrollBarVisibility="Hidden"
                      Width="310">
                <ListView.ItemContainerStyle>
                    <Style TargetType="ListViewItem">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate>
                                    <TextBlock Text="{Binding}" Foreground="Red" FontStyle="Italic" Margin="0,0,0,0" Padding="0,0,0,0" TextWrapping="Wrap"
                                               Width="310"/>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </ListView.ItemContainerStyle>
            </ListView>
        </Grid>       
    </Grid>
</UserControl>
